home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / nano / c.nanorc < prev    next >
Text File  |  2009-03-30  |  1KB  |  31 lines

  1. ## Here is an example for C/C++.
  2. ##
  3. syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
  4. color brightred "\<[A-Z_][0-9A-Z_]+\>" 
  5. color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
  6. color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
  7. color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
  8. color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
  9. color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
  10. color magenta "\<(goto|continue|break|return)\>"
  11. color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
  12. color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
  13. ##
  14. ## GCC builtins
  15. color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
  16. ##
  17. ## String highlighting.  You will in general want your comments and
  18. ## strings to come last, because syntax highlighting rules will be
  19. ## applied in the order they are read in.
  20. color brightyellow "<[^=     ]*>" ""(\\.|[^"])*""
  21. ##
  22. ## This string is VERY resource intensive!
  23. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
  24.  
  25. ## Comment highlighting
  26. color brightblue "//.*"
  27. color brightblue start="/\*" end="\*/"
  28.  
  29. ## Trailing whitespace
  30. color ,green "[[:space:]]+$"
  31.